package com.itheima.d7_interface_demo.practice;

import java.util.ArrayList;

public class ClassManager {
    private ArrayList<Student> students = new ArrayList<>();

    private final StudentService studentService;

    {
        students.add(new Student("迪丽热巴", '女', 99));
        students.add(new Student("古力娜扎", '女', 100));
        students.add(new Student("马尔扎哈", '男', 80));
        students.add(new Student("卡尔扎巴", '男', 60));
    }

    public ClassManager(StudentService studentService) {
        this.studentService = studentService;
    }

    public void printInfo(){
        studentService.printAllInfo(students);
    }

    public void printScore() {
        studentService.printAverageScore(students);
    }
}
